// ======================================================================
// Copyright (C) 2013 Hell-Prototypes. / www.hellprototypes.com
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or (at
// your option) any later version.
//
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
// ======================================================================
#ifndef CHOOSE_CFG_FILE_H
#define CHOOSE_CFG_FILE_H

#include <QDialog>
#include <QSettings>
#include <QListWidgetItem>

namespace Ui {
class choose_cfg_file;
}

class choose_cfg_file : public QDialog
{
    Q_OBJECT
    
public:
    explicit choose_cfg_file(QWidget *parent = 0);
    ~choose_cfg_file();
    
    QString get_cfg_file_path() { return m_cfg_file_path; }
    bool add_config_file(QString file_path);

private slots:
    void on_bb_ok_cancel_accepted();
    void on_lw_cfg_file_list_itemDoubleClicked(QListWidgetItem *item);
    void on_lw_cfg_file_list_itemSelectionChanged();
    void on_pb_remove_file_from_list_clicked();
    void on_pb_delete_file_from_disk_clicked();
    void on_pb_load_cfg_file_clicked();

private:
    Ui::choose_cfg_file *ui;

    QString m_cfg_file_path;
    QSettings *m_config_file;
};

#endif // CHOOSE_CFG_FILE_H
